#define _CRT_SECURE_NO_WARNINGS 1
//#include<iostream>
//using namespace std;
//const int N = 1e5 + 10;
//int n;
//int q[N], tmp[N];
//long long num;
//void merge_sort(int q[], int l, int r)
//{
//    if (l >= r)
//        return;
//    int mid = l + r >> 1;
//    merge_sort(q, l, mid); merge_sort(q, mid + 1, r);
//    int i = l, j = mid + 1, k = 0;
//    while (i <= mid && j <= r)
//    {
//        if (q[i] <= q[j])
//            tmp[k++] = q[i++];
//        else {
//            tmp[k++] = q[j++];
//            num += mid - i + 1;
//        }
//    }
//    while (i <= mid) tmp[k++] = tmp[i++];
//    while (j <= r) tmp[k++] = tmp[j++];
//    for (i = l, j = 0; i <= r; i++, j++)
//        q[i] = tmp[j];
//}
//int main()
//{
//    scanf("%d", &n);
//    for (int i = 0; i < n; i++)
//        scanf("%d", &q[i]);
//    merge_sort(q, 0, n - 1);
//    for (int i = 0; i < n; i++)
//        printf("%lld ", q[i]);
//    cout << num;
//    return 0;
//}
#include<iostream>
#include<vector>
using namespace std;
vector<int> add(vector<int> a, vector<int> b)
{
    if (b.size() > a.size())
        return add(b, a);
    vector<int> c;
    int t = 0;
    for (int i = 0; i < a.size(); i++)
    {
        if (i < b.size())
        {
            t = a[i] + b[i];
            c.push_back(t % 10);
            t /= 10;
        }
        else
            c.push_back(a[i]);
    }
    return c;
}
int main()
{
    vector<int> a;
    vector<int> b;
    string s1, s2;
    cin >> s1 >> s2;
    for (int i = s1.size() - 1; i >= 0; i--)
        a.push_back(s1[i]);
    for (int i = s2.size() - 1; i >= 0; i--)
        b.push_back(s2[i]);
    auto c = add(a, b);
    for (int i = c.size() - 1; i >= 0; i--)
        cout << c[i];
}